import request from "@/utils/request";
import { toFormData } from "@/utils/utils.jsx";
import { method } from "lodash";
import { stringify } from "qs";
//根据code查询入库单详情
export async function selectInboundorderDetailByCode(params) {
	return request(`/new-wms/productinboundorder/select-inboundorder-detail-by-code?${stringify(params)}`, {
		loading: true
	});
}
// 确认收货
export async function confirmReceipt(params) {
	return request(`/new-wms/productinboundorder/confirm-receipt`, {
		method: "POST",
		data: params,
		loading: true
	});
}

//用户仓库下拉列表
export async function queryWarehouseList(params={}) {
	return request(`/new-wms/inventory/warehouse-list`, {
		method: "post",
		data: params,
	});
}
// 根据唯一码查询商品编码
export async function getSkuCode(params) {
	return request(`/new-wms/uniquecodes/getSkuCode?${stringify(params)}`, {
		loading: true
	});
}

//获取快麦打印数据
export async function getInboundOrderPrintData(params) {
	return request(`/new-wms/kuaimai/getInboundOrderSkuPrintData`, {
		method: "post",
		data: params
	});
}

// 获取入库单模板列表
export async function queryLabelTemplate(params) {
	return request(`/new-common/labelTemplate/list`, {
		method: "post",
		data: params,
	});
}
